function testBrowser() {    
    if (window.SpeechSynthesisUtterance === undefined) {
        document.getElementById('ss-unsupported').classList.remove('hidden');
        ['button-speak-ss', 'button-stop-ss', 'button-pause-ss', 'button-resume-ss'].forEach(function(elementId) {
          document.getElementById(elementId).setAttribute('disabled', 'disabled');
        });
      }
      else {          
          document.getElementById('button-speak-ss').addEventListener('click', function(event) {
          event.preventDefault();
 
          //var selectedVoice = voices.options[voices.selectedIndex];
 
          // Create the utterance object setting the chosen parameters
          var utterance = new SpeechSynthesisUtterance();
 
          utterance.text = text.value;
          //utterance.voice = selectedVoice.getAttribute('data-voice-uri');
          utterance.lang = 'en-US';
          utterance.pitch = 1;
 
          utterance.onstart = function() {
            log.innerHTML = 'Speaker started' + '<br />' + log.innerHTML;
          };
 
          utterance.onend = function() {
            log.innerHTML = 'Speaker finished' + '<br />' + log.innerHTML;
          };
 
          window.speechSynthesis.speak(utterance);
        });
        
        
        document.getElementById('button-stop-ss').addEventListener('click', function(event) {
          event.preventDefault();
 
          window.speechSynthesis.cancel();
          log.innerHTML = 'Speaker stopped' + '<br />' + log.innerHTML;
        });
        
        document.getElementById('button-pause-ss').addEventListener('click', function(event) {
          event.preventDefault();
 
          window.speechSynthesis.pause();
          log.innerHTML = 'Speaker paused' + '<br />' + log.innerHTML;
        });
        
        document.getElementById('button-resume-ss').addEventListener('click', function(event) {
          event.preventDefault();
 
          if (window.speechSynthesis.paused === true) {
            window.speechSynthesis.resume();
            log.innerHTML = 'Speaker resumed' + '<br />' + log.innerHTML;
          } else {
            log.innerHTML = 'Unable to resume. Speaker is not paused.' + '<br />' + log.innerHTML;
          }
        });
 
        document.getElementById('clear-all').addEventListener('click', function() {
          log.textContent = '';
        });
        
        document.getElementById('button-reaload-ss').addEventListener('click', function(event) {
          event.preventDefault();
 
          location.reload();
          //log.innerHTML = 'Load new text' + '<br />' + log.innerHTML;
        });
        
        var recognition = new webkitSpeechRecognition();
        recognition.continuous = true;
        recognition.interimResults = true;
        
        var recognizing = false;
        
        
        document.getElementById('button-talk-ss').addEventListener('click', function(event) {
          event.preventDefault();
          
          if (recognizing) {
            recognition.stop();
            return;
          }
          
          log.innerHTML = 'Recognizing voice' + '<br />' + log.innerHTML;  
          
          recognition.lang = 'en-US';
          
          recognition.start();
        });
        
        var final_transcript='';
        recognition.onresult = function(event) {
            var interim_transcript = '';
            for (var i = event.resultIndex; i < event.results.length; ++i) {
                if (event.results[i].isFinal) {
                    final_transcript += event.results[i][0].transcript;
                } else {
                    interim_transcript += event.results[i][0].transcript;
                }
            }
            //final_transcript = capitalize(final_transcript);
            //interim_transcript = capitalize(interim_transcript);
            var outText = document.getElementById('outText');
            if (!(interim_transcript==='')) {                
                outText.innerHTML = interim_transcript;
            }
            

        };
        
        recognition.onstart = function() {            
            recognizing = true;
            document.getElementById('imgMic').src='mic-animate.gif';
        };
        
        recognition.onend = function() {
            document.getElementById('imgMic').src='mic.gif';
            recognizing = false;
        };
        
      }
}